package com.huajin.codetest.thread.juc;

import java.util.HashMap;
import java.util.Hashtable;
import java.util.concurrent.ConcurrentHashMap;

public class JucTest {
	
	public static void main(String[] args) {
		//-- HashMap的key和value均允许为null
		HashMap<String, Object> hashMap = new HashMap<>();
		hashMap.put(null, null);
		//-- Hashtable的key和value均不允许为null
		Hashtable<String, Object> hashtable = new Hashtable<>();
		hashtable.put("name", "张三");
		//-- ConcurrentHashMap的key和value均不允许为null
		ConcurrentHashMap<String, Object> concurrentHashMap = new ConcurrentHashMap<>();
		concurrentHashMap.put("name", "张三");
	}

}
